-if respond_to? :page_entries_info
  .search.summary=raw page_entries_info(@documents, :entry_name=>'document')

%table
  %tr
    %th.name Name
    %th.content Content
    %th.tags Tags
  -@documents.each do |document|
    %tr
      %td.name!=link_to(document.name, document_path(document))
      %td.content
        %p&=document.text_content[0..100]
      %td.tags
        %ul.tags
          -document.tags.each do |tag|
            %li!=link_to(tag, {:controller=>'documents', :tag=>tag.name})
           

-if respond_to? :paginate
  =paginate(@documents)
-elsif respond_to? :will_paginate
  =will_paginate(@documents)
